#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QListWidgetItem>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

struct myStruct
{
  QString filePath;
  QListWidgetItem* item;
  QStringList blp;
  bool isBackUp =false;
};
class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_btn_exit_clicked();

    void on_listWidget_itemClicked(QListWidgetItem *item);

    bool on_btn_save_clicked();

    void label_help_clicked();

    void on_btn_return_clicked();

    bool nativeEvent(const QByteArray &eventType, void *message, long *result);
private:
    Ui::Widget *ui;

    void dragEnterEvent(QDragEnterEvent *event);
    void dropEvent(QDropEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    bool eventFilter(QObject * watched, QEvent * event);
    QStringList getBlp(QString mdxPath);
    bool isLoad(QString mdxPath);
    void showBlp(myStruct m);
    bool backMdx(QString mdxPath);
    void showBackUpMdxCount();

    int m_nBorderWidth;

    QListWidgetItem* m_curChooseItem=NULL;
    QVector<myStruct> m_file;
    QPoint m_mouseStartPoint;
    QPoint m_windowTopLeftPoint;
    bool m_clickedTitle = false;

};
#endif // WIDGET_H
